/*
ID: icerupt1
PROG: money
LANG: C++11
*/

/*
 * 
*/
#include <fstream>
#include <iostream>

std::ifstream fin {"money.in" };
std::ofstream fout{"money.out"};

int const maxa = 10010;
long long f[maxa];
int n, a;

int main()
{
	f[0] = 1;
	fin >> n >> a;
	for (int tmp; fin >> tmp; )
		for (int j = tmp; j <= a; j++) f[j] += f[j-tmp];
	std::cout << f[a] << '\n';
	fout << f[a] << '\n';
}
